package com.cw2.behavioral.visitor;

/**
 * 访问者模式
 */
public class MainTest {
    public static void main(String[] args) {
        XiaoAi xiaoAi = new XiaoAi();
        xiaoAi.answerQuestion();

        // 执行增强功能
        UpdatePackage updatePackage = new UpdatePackage("联网增强功能");
        xiaoAi.acceptUpdate(updatePackage);
        xiaoAi.answerQuestion();
    }
}
